<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8">
    <title>Phalanx Holding</title>

    <meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport'>
    <link rel="apple-touch-icon" href="/one/Public/img/star.jpg" />
      <link rel="icon" sizes="196x196" href="/one/Public/img/star.jpg">
      <!-- Bootstrap 3.3.4 -->
    <link href="/one/Public/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css" />    
    <meta http-equiv="X-UA-Compatible" content="IE=9" />
    <!-- FontAwesome 4.3.0 -->
    <link href="/one/Public/plugins/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css" />
    <!-- Ionicons 2.0.0 -->
    <link href="/one/Public/plugins/ionicons-master/css/ionicons.min.css" rel="stylesheet" type="text/css" />
    <!-- Theme style -->
    <link href="/one/Public/dist/css/AdminLTE.min.css" rel="stylesheet" type="text/css" />

    <!-- AdminLTE Skins. Choose a skin from the css/skins 
         folder instead of downloading all of them to reduce the load. -->
    <link href="/one/Public/dist/css/skins/_all-skins.min.css" rel="stylesheet" type="text/css" />
       <!-- bootstrap wysihtml5 - text editor -->
    <link href="/one/Public/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css" rel="stylesheet" type="text/css" />

    
    <link href="/one/Public/plugins/bootstrap-editable/css/bootstrap-editable.css" rel="stylesheet" type="text/css" />
    <link href="/one/Public/plugins/bootstrap-editable/css/custom_link.css" rel="stylesheet" type="text/css" />

 
    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
        <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
        <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <![endif]-->
  </head>

  <body class="skin-blue-light sidebar-mini sidebar-collapse">
    <div class="wrapper">
      
                   <header class="main-header">
          <!-- Logo -->
        <a href="<?php echo 'http://'.$_SERVER['SERVER_NAME'].U('/Index'); ?>" class="logo">
          <!-- mini logo for sidebar mini 50x50 pixels -->
          <span class="logo-mini"><b>P</b>HG</span>
          <!-- logo for regular state and mobile devices -->
          <span class="logo-lg"><b>Phalanx</b>Holding</span>
        </a>
        <!-- Header Navbar: style can be found in header.less -->
        <nav class="navbar navbar-static-top" role="navigation">
          <!-- Sidebar toggle button-->
          <a href="#" class="sidebar-toggle" data-toggle="offcanvas" role="button">
            <span class="sr-only">Toggle navigation</span>
          </a>
          <div class="navbar-custom-menu">
            <ul class="nav navbar-nav">
                <?php if($clear_cache_btn): ?>
                <li class="list-langs"><a href="javascript:;" title="<?php echo (L("Update")); ?>" id="clear_cache_btn"><i class="fa fa-refresh"></i></a></li>
                <?php endif; ?>
                <li class="dropdown list-langs" style="position: relative">
                    <a href="<?php echo U('/Link/link'); ?>"  style="padding: 9px;">
                        <img src="/one/Public/img/favs-icon.png" style="max-width: 32px" title="<?php echo (L("Common Link")); ?>"/>
                        <span class="hidden-xs hidden-sm"><?php echo (L("Common Link")); ?></span>
                    </a>
                </li>

                <li class="dropdown list-langs">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                    <?php
 $langSet = cookie('think_language'); if (strtolower($langSet) == 'zh-cn') { ?>
                        <div class="flag flags-china pull-left"></div>&nbsp;<span class="hidden-xs">中文</span>
                    <?php
 } else { ?>
                        <div class="flag flags-american pull-left"></div>&nbsp;<span class="hidden-xs">English</span>
                   <?php
 } ?>
                    </a>
                    <ul class="dropdown-menu langs ">
                        <li ><a href="?l=zh-cn" class="list-langs clearfix"><div class="flag flags-china col-xs-6 col-md-6"></div><span class=" col-xs-6 col-md-6 text-black">中文</span></a> </li>
                        <li ><a href="?l=en-us" class="list-langs clearfix"><div class="flag flags-american col-xs-6 col-md-6"></div><span class="col-xs-6 col-md-6 text-black" >English</span></a></li>
                    </ul>
                </li>
              <!-- User Account: style can be found in dropdown.less -->
              <?php  $avatar == ''?$avatar = '/one/Public/dist/img/avatar5.png':$avatar; ?>
              <li class="dropdown user user-menu">
                <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                  <img src="<?php echo ($avatar); ?>" class="user-image" alt="User Image"/>
                  <span class="hidden-xs"><?php echo getUserName(); ?></span>
                </a>
                <ul class="dropdown-menu">
                  <!-- User image -->
                  <li class="user-header">
                    <img src="<?php echo ($avatar); ?>" class="img-circle" alt="User Image" />
                    <p>
                      <?php echo getUserName(); ?>
                    </p>
                  </li>
                  <li class="user-footer">
                    <div class="pull-left">
                      <a href="<?php echo U('/Index/editProfile'); ?>" class="btn btn-default btn-flat"><?php echo (L("Profile")); ?></a>
                        <!-- Profile-->
                    </div>
                    <div class="pull-right">
                      <a href="<?php echo U('/Public/logout'); ?>" class="btn btn-default btn-flat"><?php echo (L("Sign out")); ?></a>
                    </div>
                  </li>
                </ul>
              </li>
              <!-- Control Sidebar Toggle Button -->
              <!--<li>-->
                <!--<a href="#" data-toggle="control-sidebar"><i class="fa fa-gears"></i></a>-->
              <!--</li>-->
            </ul>
          </div>
        </nav>
      </header>
      
      
               <!-- Left side column. contains the logo and sidebar -->
      <aside class="main-sidebar ">
        <!-- sidebar: style can be found in sidebar.less -->
        <section class="sidebar">
          <!-- Sidebar user panel -->
          <div class="user-panel">
            <div class="pull-left image">
              <img src="<?php echo ($avatar); ?>" class="img-circle" alt="User Image" />
            </div>
            <div class="pull-left info ">
              <p><?php echo getUserName(); ?></p>

              <a href="#"><i class="fa fa-circle text-success"></i> Online</a>
            </div>
          </div>
          <!-- sidebar menu: : style can be found in sidebar.less -->
          <ul class="sidebar-menu">
            <li class="header">MAIN NAVIGATION</li>
              <?php if(is_array($groups)): $i = 0; $__LIST__ = $groups;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$group): $mod = ($i % 2 );++$i;?><li class="treeview <?php ?>  active <?php ?>">
                      <a href="#">
                          <i class="<?php echo $group['icon']==''? 'fa fa-th':$group['icon']; ?>"></i> <span><?php echo L($group['title']); ?></span>
                          <i class="fa fa-angle-left pull-right"></i>
                      </a>
                      <ul class="treeview-menu">
                          <?php if(is_array($menu[$group['id']])): $i = 0; $__LIST__ = $menu[$group['id']];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$item): $mod = ($i % 2 );++$i; if(($item['access']) == "1"): if(($item["level"]) == "3"): ?><li class=" <?php if ($item['name'] == $currunt_note) : ?> active <?php endif;?>">
									  <!-- $parents[$item['pid']]['name'].'/'. -->
                                          <a href="<?php echo U('/'.$item['name']); ?>" ><i class="fa fa-circle-o"></i><?php echo L($item['title']) ?></a>
                                      </li>
                                      <?php else: ?>
                                      <li class=" <?php if ($item['name'] == $currunt_note) : ?> active <?php endif;?>">
                                        <?php $color_arr = array('red','yellow','aqua','square','green','orange'); ?>
                                          <a href="<?php echo U('/'.$item['name']); ?>" ><i class="fa fa-circle-o text-<?php echo $color_arr[rand(0,5)] ?>"></i><?php echo L($item['title']) ?></a>
                                      </li><?php endif; endif; endforeach; endif; else: echo "" ;endif; ?>
                      </ul>
                  </li><?php endforeach; endif; else: echo "" ;endif; ?>
          </ul>
        </section>
        <!-- /.sidebar -->
      </aside>
      
      <!-- Content Wrapper. Contains page content -->
      <div class="content-wrapper">
        <!-- Content Header (Page header) -->
          
            <section class="content-header">
                    <!--<h1>-->
                        <!--<?php echo getNodeName($currunt_note); ?>-->
                        <!--<small>Control panel</small>-->
                    <!--</h1>-->
                    <div style="margin:0px 15px;">
                        <ol class="breadcrumb " style="margin: 0">
                            <li><a href="<?php echo 'http://'.$_SERVER['SERVER_NAME'].U('/Index'); ?>" title="<?php echo (L("Index")); ?>"><i class="fa fa-dashboard"></i> One </a></li>
                            <li class="active"><a href="/one/Link"><?php echo L($currunt_note); ?></a></li>
                        </ol>
                    </div>

            </section>
        
        <section class="content">
            <div class="alert alert-dismissable alert-success" id="top-alert" style="display:none">
                <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
                <h4> <div class="alert-title"></div></h4><div class="alert-content"></div>
            </div>

            
    <style>
        .link-lists .linkitem{
            margin: 10px 0px;
            min-height: 60px;
            border-bottom: 1px dashed  #ddd;

        }
        .link-lists .linkitem.last{
            border-bottom:none;
        }
        .link-lists .link-row{
            line-height: 60px;
        }
        .link-lists button.editable-remove{
            margin: 5px 0px;
        }

    </style>

    <?php if ($link_role != 'core'): ?>
    <style>
        .link-stytem .editable-submit ,.link-stytem .editable-removelink{display: none}
    </style>
    <?php endif; ?>
    <section class="content">

        <div class="panel panel-primary com-link-panel">
            <div class="panel-heading">
                <label><?php echo (L("Link")); ?></label>
                <a href="javascript:;" id="edit-button" class="pull-right" style="color: #FFFFFF" tab="edit"><?php echo (L("Edit")); ?></a>
            </div>
            <div class="panel-body">

                <div class="link-lists">
                    <?php $count = 0; ?>
                    <?php if(is_array($linklist)): $i = 0; $__LIST__ = $linklist;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$item): $mod = ($i % 2 );++$i;?><div class="row linkitem link-stytem">
                            <div class="col-md-1  link-row " style="min-width: 89px">
                                <?php $row = $key; ?>
                                <label><?php echo (getOptionsLabel($key, C('link_category'))); ?></label>
                            </div>
                           <div class="col-md-11 link-row ">
                            <?php if(is_array($item)): $i = 0; $__LIST__ = $item;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$val): $mod = ($i % 2 );++$i; $url = $val['url']; if ($val['title'] == 'C6 System'){ $url = $c6_url; }else if ($val['title'] == 'Internal Forum'){ $url = $forum_url; }else if ($val['title'] == 'ETS System'){ $url = $ets_login_url; }else if ($val['title'] =='Questionnaire System'){ $url = $val['url'].'?uid='.$login_code; } ?>
                                    <div class="  col-md-3 col-sm-6 col-xs-12 text-left ">
                                    <a href="<?php echo ($url); ?>" data-removelink="/one/Link/removeLink/id/<?php echo ($val['id']); ?>" target="_blank" data-type="address"
                                     data-renderhome="/one/Link/renderhome/id/<?php echo ($val['id']); ?>/tag/link"  data-pk="<?php echo ($val['id']); ?>"  data-title="Enter <?php echo ($val['title']); ?>" class="editable" style="cursor: pointer !important; overflow: hidden">
                                        <img src="<?php echo ($val['icon']); ?>"  style="max-width: 20px"/>
                                        <span><?php echo L($val['title']); ?></span>
                                    </a>
                                    </div><?php endforeach; endif; else: echo "" ;endif; ?>
                               <?php if ($link_role == 'core'): ?>
                               <a href="" data-type="address"  data-placement="right" data-pk="" category="<?php echo ($row); ?>"  class="editable editable-click  btn btn-primary link-new " style="display: none;padding: 3px;"  >Add</a>
                                <?php endif; ?>
                           </div>
                            <?php $count++; ?>
                        </div><?php endforeach; endif; else: echo "" ;endif; ?>
                      <div class="col-md-1  link-row " style="min-width: 89px">
                       		<label><?php echo (L("Favorites")); ?></label>
                      </div>
                    <div class="row linkitem last">
                        <div class="col-md-11 link-row ">
                          <?php if(is_array($favoriteList)): $i = 0; $__LIST__ = $favoriteList;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$items): $mod = ($i % 2 );++$i; if(is_array($items)): $i = 0; $__LIST__ = $items;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$item): $mod = ($i % 2 );++$i; $favoriteUrl = $item['favorite_url']; ?>
	                         	<div class="  col-md-3 col-sm-6 col-xs-12 text-left ">
		                             <a href="<?php echo ($favoriteUrl); ?>" data-removelink="/one/Link/removeFavoriteLink/id/<?php echo ($item['id']); ?>" target="_blank" data-type="address"
		                                   data-renderhome="/one/Link/renderhome/id/<?php echo ($item['id']); ?>/tag/favorite"   data-pk="<?php echo ($item['id']); ?>" category = "8" data-title="Enter <?php echo ($item['title']); ?>" class="editable" style="cursor: pointer !important; overflow: hidden">
		                                   <img src="<?php echo ($item['icon']); ?>"  style="max-width: 20px"/>
		                                   <span><?php echo $item['title']; ?></span>
		                             </a>
	                         	</div><?php endforeach; endif; else: echo "" ;endif; endforeach; endif; else: echo "" ;endif; ?>
                            <a href="" data-type="address"  data-placement="right" data-pk="" category="8" tag="favorite" class="editable editable-click  btn btn-primary link-new " style="display: none;padding: 3px;"  >Add</a>
                        </div>
                    </div>
                  
                </div>

            </div>
         </div>
    </section><!-- /.content -->



        </section>

      </div><!-- /.content-wrapper -->
      
          
<footer class="main-footer">
  <div class="pull-right hidden-xs">
    <b>Version</b> 1.0
  </div>
  <strong>Copyright &copy; 2015 <a href="#">Phalanx Holding</a>.</strong> All rights reserved.
</footer>
      <!---->
      <!--&lt;!&ndash; Control Sidebar &ndash;&gt;      -->
      <!--<aside class="control-sidebar control-sidebar-dark">                -->
        <!--&lt;!&ndash; Create the tabs &ndash;&gt;-->
        <!--<ul class="nav nav-tabs nav-justified control-sidebar-tabs">-->
          <!--<li><a href="#control-sidebar-home-tab" data-toggle="tab"><i class="fa fa-home"></i></a></li>-->
          <!---->
          <!--<li><a href="#control-sidebar-settings-tab" data-toggle="tab"><i class="fa fa-gears"></i></a></li>-->
        <!--</ul>-->
        <!--&lt;!&ndash; Tab panes &ndash;&gt;-->
        <!--<div class="tab-content">-->
          <!--&lt;!&ndash; Home tab content &ndash;&gt;-->
          <!--<div class="tab-pane" id="control-sidebar-home-tab">-->
            <!--<h3 class="control-sidebar-heading">Recent Activity</h3>-->
            <!--<ul class='control-sidebar-menu'>-->
              <!--<li>-->
                <!--<a href='javascript::;'>-->
                  <!--<i class="menu-icon fa fa-birthday-cake bg-red"></i>-->
                  <!--<div class="menu-info">-->
                    <!--<h4 class="control-sidebar-subheading">Langdon's Birthday</h4>-->
                    <!--<p>Will be 23 on April 24th</p>-->
                  <!--</div>-->
                <!--</a>-->
              <!--</li>-->
              <!--<li>-->
                <!--<a href='javascript::;'>-->
                  <!--<i class="menu-icon fa fa-user bg-yellow"></i>-->
                  <!--<div class="menu-info">-->
                    <!--<h4 class="control-sidebar-subheading">Frodo Updated His Profile</h4>-->
                    <!--<p>New phone +1(800)555-1234</p>-->
                  <!--</div>-->
                <!--</a>-->
              <!--</li>-->
              <!--<li>-->
                <!--<a href='javascript::;'>-->
                  <!--<i class="menu-icon fa fa-envelope-o bg-light-blue"></i>-->
                  <!--<div class="menu-info">-->
                    <!--<h4 class="control-sidebar-subheading">Nora Joined Mailing List</h4>-->
                    <!--<p>nora@example.com</p>-->
                  <!--</div>-->
                <!--</a>-->
              <!--</li>-->
              <!--<li>-->
                <!--<a href='javascript::;'>-->
                  <!--<i class="menu-icon fa fa-file-code-o bg-green"></i>-->
                  <!--<div class="menu-info">-->
                    <!--<h4 class="control-sidebar-subheading">Cron Job 254 Executed</h4>-->
                    <!--<p>Execution time 5 seconds</p>-->
                  <!--</div>-->
                <!--</a>-->
              <!--</li>-->
            <!--</ul>&lt;!&ndash; /.control-sidebar-menu &ndash;&gt;-->

            <!--<h3 class="control-sidebar-heading">Tasks Progress</h3> -->
            <!--<ul class='control-sidebar-menu'>-->
              <!--<li>-->
                <!--<a href='javascript::;'>               -->
                  <!--<h4 class="control-sidebar-subheading">-->
                    <!--Custom Template Design-->
                    <!--<span class="label label-danger pull-right">70%</span>-->
                  <!--</h4>-->
                  <!--<div class="progress progress-xxs">-->
                    <!--<div class="progress-bar progress-bar-danger" style="width: 70%"></div>-->
                  <!--</div>                                    -->
                <!--</a>-->
              <!--</li> -->
              <!--<li>-->
                <!--<a href='javascript::;'>               -->
                  <!--<h4 class="control-sidebar-subheading">-->
                    <!--Update Resume-->
                    <!--<span class="label label-success pull-right">95%</span>-->
                  <!--</h4>-->
                  <!--<div class="progress progress-xxs">-->
                    <!--<div class="progress-bar progress-bar-success" style="width: 95%"></div>-->
                  <!--</div>                                    -->
                <!--</a>-->
              <!--</li> -->
              <!--<li>-->
                <!--<a href='javascript::;'>               -->
                  <!--<h4 class="control-sidebar-subheading">-->
                    <!--Laravel Integration-->
                    <!--<span class="label label-waring pull-right">50%</span>-->
                  <!--</h4>-->
                  <!--<div class="progress progress-xxs">-->
                    <!--<div class="progress-bar progress-bar-warning" style="width: 50%"></div>-->
                  <!--</div>                                    -->
                <!--</a>-->
              <!--</li> -->
              <!--<li>-->
                <!--<a href='javascript::;'>               -->
                  <!--<h4 class="control-sidebar-subheading">-->
                    <!--Back End Framework-->
                    <!--<span class="label label-primary pull-right">68%</span>-->
                  <!--</h4>-->
                  <!--<div class="progress progress-xxs">-->
                    <!--<div class="progress-bar progress-bar-primary" style="width: 68%"></div>-->
                  <!--</div>                                    -->
                <!--</a>-->
              <!--</li>               -->
            <!--</ul>&lt;!&ndash; /.control-sidebar-menu &ndash;&gt;         -->

          <!--</div>&lt;!&ndash; /.tab-pane &ndash;&gt;-->
          <!--&lt;!&ndash; Stats tab content &ndash;&gt;-->
          <!--<div class="tab-pane" id="control-sidebar-stats-tab">Stats Tab Content</div>&lt;!&ndash; /.tab-pane &ndash;&gt;-->
          <!--&lt;!&ndash; Settings tab content &ndash;&gt;-->
          <!--<div class="tab-pane" id="control-sidebar-settings-tab">            -->
            <!--<form method="post">-->
              <!--<h3 class="control-sidebar-heading">General Settings</h3>-->
              <!--<div class="form-group">-->
                <!--<label class="control-sidebar-subheading">-->
                  <!--Report panel usage-->
                  <!--<input type="checkbox" class="pull-right" checked />-->
                <!--</label>-->
                <!--<p>-->
                  <!--Some information about this general settings option-->
                <!--</p>-->
              <!--</div>&lt;!&ndash; /.form-group &ndash;&gt;-->

              <!--<div class="form-group">-->
                <!--<label class="control-sidebar-subheading">-->
                  <!--Allow mail redirect-->
                  <!--<input type="checkbox" class="pull-right" checked />-->
                <!--</label>-->
                <!--<p>-->
                  <!--Other sets of options are available-->
                <!--</p>-->
              <!--</div>&lt;!&ndash; /.form-group &ndash;&gt;-->

              <!--<div class="form-group">-->
                <!--<label class="control-sidebar-subheading">-->
                  <!--Expose author name in posts-->
                  <!--<input type="checkbox" class="pull-right" checked />-->
                <!--</label>-->
                <!--<p>-->
                  <!--Allow the user to show his name in blog posts-->
                <!--</p>-->
              <!--</div>&lt;!&ndash; /.form-group &ndash;&gt;-->

              <!--<h3 class="control-sidebar-heading">Chat Settings</h3>-->

              <!--<div class="form-group">-->
                <!--<label class="control-sidebar-subheading">-->
                  <!--Show me as online-->
                  <!--<input type="checkbox" class="pull-right" checked />-->
                <!--</label>                -->
              <!--</div>&lt;!&ndash; /.form-group &ndash;&gt;-->

              <!--<div class="form-group">-->
                <!--<label class="control-sidebar-subheading">-->
                  <!--Turn off notifications-->
                  <!--<input type="checkbox" class="pull-right" />-->
                <!--</label>                -->
              <!--</div>&lt;!&ndash; /.form-group &ndash;&gt;-->

              <!--<div class="form-group">-->
                <!--<label class="control-sidebar-subheading">-->
                  <!--Delete chat history-->
                  <!--<a href="javascript::;" class="text-red pull-right"><i class="fa fa-trash-o"></i></a>-->
                <!--</label>                -->
              <!--</div>&lt;!&ndash; /.form-group &ndash;&gt;-->
            <!--</form>-->
          <!--</div>&lt;!&ndash; /.tab-pane &ndash;&gt;-->
        <!--</div>-->
      <!--</aside>&lt;!&ndash; /.control-sidebar &ndash;&gt;-->
      <!-- Add the sidebar's background. This div must be placed
           immediately after the control sidebar -->
      <div class='control-sidebar-bg'></div>
</div><!-- ./wrapper -->

      

     <!-- jQuery 2.1.4 -->
    <script src="/one/Public/plugins/jQuery/jQuery-2.1.4.min.js"></script>

    <!-- ajax Jquery form -->
    <script src="/one/Public/dist/js/jquery.form.js" type="text/javascript"></script>
    <!-- custom extends js -->
    <script src="/one/Public/dist/js/custom.extends.js" type="text/javascript"></script>
    <!-- jQuery UI 1.11.2 -->
    <script src="/one/Public/plugins/jQueryUI/jquery-ui.min.js" type="text/javascript"></script>
    <!-- Resolve conflict in jQuery UI tooltip with Bootstrap tooltip -->
    <script>
      $.widget.bridge('uibutton', $.ui.button);
    </script>
    <!-- Bootstrap 3.3.2 JS -->
    <script src="/one/Public/bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
    <!-- Slimscroll -->
    <script src="/one/Public/plugins/slimScroll/jquery.slimscroll.min.js" type="text/javascript"></script>
    <!-- AdminLTE App -->
    <script src="/one/Public/dist/js/app.min.js" type="text/javascript"></script>

    <!-- AdminLTE for demo purposes -->
    <script src="/one/Public/dist/js/demo.js" type="text/javascript"></script>

    <!-- Bootstrap WYSIHTML5 -->
    <script src="/one/Public/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.all.min.js" type="text/javascript"></script>

    <!--bootstrap Validator-->
    <script src="/one/Public/dist/js/bootstrapValidator.js" type="text/javascript"></script>
    <script src="/one/Public/dist/js/language/zh_CN.js" type="text/javascript"></script>

    <!--<script type="text/javascript" src="/one/Public/dist/js/jquery.touchSwipe.min.js"></script>-->

    
    <script src="/one/Public/plugins/bootstrap-editable/js/bootstrap-editable.js" type="text/javascript"></script>
    <script src="/one/Public/plugins/bootstrap-editable/js/custom_link.js" type="text/javascript"></script>
    <script type="text/javascript">

        $('#edit-button').click(function() {
            $('.com-link-panel .editable').editable('toggleDisabled');
            $('.com-link-panel .link-new').toggle();
            $(this).attr('tab') == 'edit'?$(this).text('<?php echo L("Esc");?>').attr('tab','esc'):$(this).text('<?php echo L("Edit");?>').attr('tab','edit');
        });
        $(function(){

            $('.com-link-panel .editable').each(function(){
                var then = $(this);
                var furl;
                if (then.attr('category') == '8' ){
                	furl = '/one/Link/saveFavorite';
                } else {
                	furl = '/one/Link/ajaxChangeLink';
                }
                $(this).editable({
                        url: furl,
                        title: 'Enter username',
                        params: function(params) {
                            params.category_id = then.attr('category');
                            return params;
                        },
                        value:  {
                            title: then.find('span').html(),
                            link: then.attr('href')
                        },
                        validate: function(value) {
                            if(value.title == '') return 'title is required!';
                            if(value.link == '') return 'link is required!';
                        }
                        ,
                        success:function(response){
                            if(response.status){
                                then.html(then.find('span').html());
                                updateAlert(response.info,'alert-success','Success!');
                                location.reload();
                            }else {
                                updateAlert(response.info,'alert-danger','Error!');
                            }
                        }
                });

            });

            $('.com-link-panel .editable').editable('toggleDisabled');

         });

    </script>


    <script src="/one/Public/ie/jquery.placeholder.min.js" type="text/javascript"></script>
    <script type="text/javascript">
    $(function () {
        // Invoke the plugin
        $('input, textarea').placeholder();
    });
    </script>
    </div>
    </body>
</html>